package com.woniuxy.third.service.impl;

import com.woniuxy.third.enyity.Perms;
import com.woniuxy.third.enyity.Role;
import com.woniuxy.third.enyity.User;
import com.woniuxy.third.service.UserService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Override
    public User findByAccount(String account) {
        List<Perms> perms = Arrays.asList(
                new Perms(3001, "goods:all"),
                new Perms(3002, "goods:add"),
                new Perms(3003, "goods:del")
        );
        List<Role> roles = Arrays.asList(
                new Role(2001, "admin", perms)
        );
        return new User(1001,"zhangsan","123",roles);
    }
}
